import fetch from "@/utils/fetch"
//根据连接名获取数据连接列表
export function addManage(data){
    
    return fetch({
        url:'dataProcess/addJob',
        method:'post',
        headers: {'content-type': 'application/json;charset=UTF-8'},
        data:JSON.stringify(data)
    })
}
//显示所有脚本信息
export function getJobDetail(data){
    
    return fetch({
        url:'dataProcess/getJobDetail',
        method:'post',
        headers: {'content-type': 'application/json;charset=UTF-8'},
        data:JSON.stringify(data)
    })
}
export function addFile (data) {
    return fetch({
        method: 'post',
        url: 'dataProcess/uploadScript',
        timeout: 20000,
        data: data
    })
}
//显示任务处理结果
export function getJobStates(data){
    
    return fetch({
        url:'dataProcess/getJobStatus',
        method:'post',
        headers: {'content-type': 'application/json;charset=UTF-8'},
        data:JSON.stringify(data)
    })
}